package com.car.controller;

import com.car.entity.Citytable;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.apache.catalina.Session;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/city")
public class CitytableController   {
	@RequestMapping("/findCity")
	@ResponseBody
	public String findCity(@RequestParam("city") String city,HttpSession session){
		String citys=city.substring(0, city.length()-1);
		session.setAttribute("myCity", citys);
		session.setAttribute("hcmycity", citys);
		return citys;
	}
	
}